{"ast":null,"code":"import { TinyColor } from '@ctrl/tinycolor';\nfunction isStableColor(color) {\n  return color >= 0 && color <= 255;\n}\nfunction getAlphaColor(frontColor, backgroundColor) {\n  var _TinyColor$toRgb = new TinyColor(frontColor).toRgb(),\n    fR = _TinyColor$toRgb.r,\n    fG = _TinyColor$toRgb.g,\n    fB = _TinyColor$toRgb.b,\n    originAlpha = _TinyColor$toRgb.a;\n  if (originAlpha < 1) {\n    return frontColor;\n  }\n  var _TinyColor$toRgb2 = new TinyColor(backgroundColor).toRgb(),\n    bR = _TinyColor$toRgb2.r,\n    bG = _TinyColor$toRgb2.g,\n    bB = _TinyColor$toRgb2.b;\n  for (var fA = 0.01; fA <= 1; fA += 0.01) {\n    var r = Math.round((fR - bR * (1 - fA)) / fA);\n    var g = Math.round((fG - bG * (1 - fA)) / fA);\n    var b = Math.round((fB - bB * (1 - fA)) / fA);\n    if (isStableColor(r) && isStableColor(g) && isStableColor(b)) {\n      return new TinyColor({\n        r: r,\n        g: g,\n        b: b,\n        a: Math.round(fA * 100) / 100\n      }).toRgbString();\n    }\n  }\n  // fallback\n  /* istanbul ignore next */\n  return new TinyColor({\n    r: fR,\n    g: fG,\n    b: fB,\n    a: 1\n  }).toRgbString();\n}\nexport default getAlphaColor;","map":{"version":3,"names":["TinyColor","isStableColor","color","getAlphaColor","frontColor","backgroundColor","toRgb","fR","r","fG","g","fB","b","originAlpha","a","bR","bG","bB","fA","Math","round","toRgbString"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/theme/util/getAlphaColor.js"],"sourcesContent":["import { TinyColor } from '@ctrl/tinycolor';\nfunction isStableColor(color) {\n  return color >= 0 && color <= 255;\n}\nfunction getAlphaColor(frontColor, backgroundColor) {\n  const {\n    r: fR,\n    g: fG,\n    b: fB,\n    a: originAlpha\n  } = new TinyColor(frontColor).toRgb();\n  if (originAlpha < 1) {\n    return frontColor;\n  }\n  const {\n    r: bR,\n    g: bG,\n    b: bB\n  } = new TinyColor(backgroundColor).toRgb();\n  for (let fA = 0.01; fA <= 1; fA += 0.01) {\n    const r = Math.round((fR - bR * (1 - fA)) / fA);\n    const g = Math.round((fG - bG * (1 - fA)) / fA);\n    const b = Math.round((fB - bB * (1 - fA)) / fA);\n    if (isStableColor(r) && isStableColor(g) && isStableColor(b)) {\n      return new TinyColor({\n        r,\n        g,\n        b,\n        a: Math.round(fA * 100) / 100\n      }).toRgbString();\n    }\n  }\n  // fallback\n  /* istanbul ignore next */\n  return new TinyColor({\n    r: fR,\n    g: fG,\n    b: fB,\n    a: 1\n  }).toRgbString();\n}\nexport default getAlphaColor;"],"mappings":"AAAA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,aAAa,CAACC,KAAK,EAAE;EAC5B,OAAOA,KAAK,IAAI,CAAC,IAAIA,KAAK,IAAI,GAAG;AACnC;AACA,SAASC,aAAa,CAACC,UAAU,EAAEC,eAAe,EAAE;EAClD,uBAKI,IAAIL,SAAS,CAACI,UAAU,CAAC,CAACE,KAAK,EAAE;IAJhCC,EAAE,oBAALC,CAAC;IACEC,EAAE,oBAALC,CAAC;IACEC,EAAE,oBAALC,CAAC;IACEC,WAAW,oBAAdC,CAAC;EAEH,IAAID,WAAW,GAAG,CAAC,EAAE;IACnB,OAAOT,UAAU;EACnB;EACA,wBAII,IAAIJ,SAAS,CAACK,eAAe,CAAC,CAACC,KAAK,EAAE;IAHrCS,EAAE,qBAALP,CAAC;IACEQ,EAAE,qBAALN,CAAC;IACEO,EAAE,qBAALL,CAAC;EAEH,KAAK,IAAIM,EAAE,GAAG,IAAI,EAAEA,EAAE,IAAI,CAAC,EAAEA,EAAE,IAAI,IAAI,EAAE;IACvC,IAAMV,CAAC,GAAGW,IAAI,CAACC,KAAK,CAAC,CAACb,EAAE,GAAGQ,EAAE,IAAI,CAAC,GAAGG,EAAE,CAAC,IAAIA,EAAE,CAAC;IAC/C,IAAMR,CAAC,GAAGS,IAAI,CAACC,KAAK,CAAC,CAACX,EAAE,GAAG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